home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr52 / achoice2.zip / ACHOICE2.PRG
Text File  |  1993-04-02  |  2KB  |  65 lines

  1. * * * * * BIRTHDAY.PRG
  2. *
  3. * * By:  Walt Morgan, PO Box 353, Lawrenceburg, TN  38464 (615) 762-3300
  4. *
  5. * * * * * Using Clipper '87 ACHOICE() Example
  6. PUBLIC RMONTH
  7. CLEAR
  8. USE BIRTHDAY
  9. ZAP
  10. USE
  11. H1='ROUTINE TO PRINT MONTHLY BIRTHDAY LISTING'
  12. L1 = (80-LEN(H1))/2
  13. @ 1,0 TO 3,79 DOUBLE
  14. @ 2,L1 SAY H1
  15. F1 = ' Highlight Month and Press Enter '
  16. L2 = (80-LEN(F1))/2
  17. SET COLOR TO N/W
  18. @ 20,L2 SAY F1
  19. SET COLOR TO W/N
  20. RMONTH = MONTH(DATE())+1  && This allows placing the cursor on the
  21. *                         && next month as a logical choice.
  22. DECLARE RNEW[12]
  23. RNEW[1]  = 'January  '    && Placing a space in front of each choice
  24. RNEW[2]  = 'February '    && allows wrapping of the cursor with the
  25. RNEW[3]  = 'March    '    && spacebar.  The up/down arrows still function
  26. RNEW[4]  = 'April    '    && as expected.  However, pressing the first letter
  27. RNEW[5]  = 'May      '    && of the choice is disabled. wlm 2-16-88
  28. RNEW[6]  = 'June     '
  29. RNEW[7]  = 'July     '
  30. RNEW[8]  = 'August   '
  31. RNEW[9]  = 'September'
  32. RNEW[10] = 'October  '
  33. RNEW[11] = 'November '
  34. RNEW[12] = 'December '
  35.  
  36. MTOP     = 6
  37. MLEFT    = 35
  38. MBOTTOM  = 17
  39. MRIGHT   = 43
  40.  
  41. WTOP     = MTOP   -1
  42. WLEFT    = MLEFT  -2
  43. WBOTTOM  = MBOTTOM+1
  44. WRIGHT   = MRIGHT +2
  45.  
  46. @ WTOP,WLEFT TO WBOTTOM,WRIGHT DOUBLE   && draw a box around choices
  47. MENUCHOICE = ACHOICE(MTOP,MLEFT,MBOTTOM,MRIGHT,RNEW,'','',RMONTH)
  48. READ
  49. RMONTH = MENUCHOICE
  50. CLEAR
  51. MOK = ' '
  52. MSG = 'Ready Printer and Press ENTER to Continue Any Other Key to Quit'
  53. CTR = (80-LEN(MSG))/2
  54. @ 22,CTR SAY MSG GET MOK
  55. READ
  56. IF .NOT. MOK = ' '
  57.    CLEAR
  58.    RETURN
  59. ENDIF
  60. CLEAR
  61. MSG = 'Printing...Please Wait'
  62. CTR = (80-LEN(MSG))/2
  63. @ 23,CTR SAY MSG
  64. *
  65. * END OF FILE